package com.serviceprovider.business.module.admin.address.services;

//~--- non-JDK imports --------------------------------------------------------

import com.serviceprovider.business.module.admin.address.dao.interfaces.IAddressDao;
import com.serviceprovider.business.module.admin.address.model.Address;
import com.serviceprovider.business.module.user.model.impl.User;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("addressService")
public class AddressService implements IAddressService {
    @Autowired
    private IAddressDao addressDao;

    @Override
    public Address insertAddress(Address address) {
        return addressDao.insertAddress(address);
    }

    @Override
    public void updateAddress(Address address) {
        addressDao.updateAddress(address);
    }

    @Override
    public void deleteAddress(int addressId) {
        addressDao.deleteAddress(addressId);
    }

    @Override
    public Address findById(int id) {
        return addressDao.findById(id);
    }

    @Override
    public void retrieveAddresses(User user) {
        addressDao.retrieveAddresses(user);
    }
}



